
#ifndef __NUMBER_H
#define __NUMBER_H

#include "includes.h"

typedef struct
{
  uint32_t length;
  int32_t data[];
} yjk_bigint_bc;


#define BIGINT_SIZE(bi) (sizeof(YJK_BIGINT) + (bi->length * sizeof(int32_t)))

int32_t
bigint_add_int32(YJK_BIGINT *bi, int32_t x, unsigned int place);

YJK_BIGINT *
bigint_mult(YJK_BIGINT *a, YJK_BIGINT *b, YJK_BIGINT *bi);

void 
make_bigint(int32_t src, YJK_BIGINT *);

void
print_bigint(YJK_BIGINT *bi);

YJK_BIGINT *
yjk_parse_bigint(char *s);

int
copy_bigint(YJK_BIGINT *bi, YJK_BIGINT *dest);

void *
add(void *a, void *b);

#endif
